//
//  UINavigationBar+Extension.m
//  Edaox
//
//  Created by cao pan on 7/12/14.
//  Copyright (c) 2014 edaox. All rights reserved.
//

#import "UINavigationBar+Extension.h"

@implementation UINavigationBar (Extension)

- (void) drawRect:(CGRect)rect {
     [self setBackgroundColor:RGBColor10Bit(78, 139, 217, 1)];
}


- (void)didMoveToSuperview {
    [super didMoveToSuperview];
    [self setBackgroundColor:RGBColor10Bit(78, 139, 217, 1)];
    [self setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName, nil]];
    if (self.superview != nil) {
   
        if (IOS7_OR_LATER) {
            self.translucent = NO;
            [self setBarTintColor:RGBColor10Bit(78, 139, 217, 1)];
        }else{
            [self setBackgroundColor:RGBColor10Bit(78, 139, 217, 1)];
        }
    }
}

@end
